<?php

include 'database.php';

$query = "SELECT id, name, price, ingr FROM pizza WHERE id_customer = '1'";
$result = mysqli_query($dbcon, $query);

echo "<table border='1'>
		<tr><th>Pizza</th><th>Ingredienten</th><th>Prijs</th><th>Bestel</th></tr>";



while($row = mysqli_fetch_array($result, MYSQLI_ASSOC)){

	$pizza_id = $row['id'];
	echo "<tr><td>";
	echo $row['name'];
	echo "</td><td>";
	echo $row['ingr'];
	echo "</td><td>";
	echo $row['price'];
	echo "</td><td>";
	echo "	<form action= 'bestel_pizza.php' method='post'>
			<input value = '$pizza_id' type='hidden' name='pizza_id'>
			<input type='submit' name='submit' value='Bestel'></form>";
	echo "</td></tr>";

}

echo "</table>";



?>